package com.example.mq.mqclient;

import lombok.Data;

import java.io.IOException;

@Data
public class ConnectionFactory {
    // Broker Server 的 ip 地址
    private String host;
    // Broker Server 的端口号
    private int port;
    // 访问 Broker Server 的哪个虚拟主机
//    private String virtualHostName;
//    private String username;
//    private String password;

    public Connection newConnection() throws IOException {
        return new Connection(host, port);
    }
}
